import request from '@/utils/request'

export function selectAll(data) {
  return request({
    url: '/api/agentInf/selectAll',
    method: 'get',
    data
  })
}

export function add(data) {
  return request({
    url: 'api/agentInf/add',
    method: 'post',
    data
  })
}

export function saveAndInstall(data) {
  return request({
    url: 'api/agentInf/saveAndInstall',
    method: 'post',
    data
  })
}



export function del(ids) {
  return request({
    url: 'api/agentInf/delete',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/agentInf/update',
    method: 'put',
    data
  })
}

export function install(data) {
  return request({
    url: 'api/agentInf/install',
    method: 'post',
    data
  })
}

export function start(data) {
  return request({
    url: 'api/agentInf/start',
    method: 'post',
    data: data
  })
}

export function stop(data) {
  return request({
    url: 'api/agentInf/stop',
    method: 'post',
    data: data
  })
}

export function restart(data) {
  return request({
    url: 'api/agentInf/restart',
    method: 'post',
    data: data
  })
}

export function checkConnect(data) {
  return request({
    url: 'api/agentInf/checkConnect',
    method: 'post',
    data: data
  })
}

export function checkAgentName(data) {
  return request({
    url: 'api/agentInf/checkAgentName',
    method: 'post',
    data: data
  })
}

export function checkAgentHost(data) {
  return request({
    url: 'api/agentInf/checkAgentHost',
    method: 'post',
    data: data
  })
}

export default { selectAll, add, del, edit, install, start, stop, restart, saveAndInstall, checkConnect, checkAgentName,
  checkAgentHost }
